Platform Explorer / Nuxeo Platform 5.8

Extension point servers

Documentation

Define an extension point to register new platform servers. Platform servers are parts of the same application that are deployed on different JVMs

Each server may expose a set of services and repositories.

Exposed services are defined as bindings between the service class and a JNDI name where the service (bean service) can be located remotely. If the client try to get a service not defined by any server the platform will try to lookup it using the local NXRuntime.

The extension should use the format:

    <server host="localhost"
        jndiContextFactory="org.nuxeo.ecm.platform.api.DefaultJndiContextFactory"
        jndiPrefix="nuxeo/" jndiSuffix="/remote" name="core" port="1099"
        repositoryConnector="org.nuxeo.ecm.platform.api.DefaultRepositoryConnector" serviceConnector="org.nuxeo.ecm.platform.api.DefaultServiceConnector">
        <service class="org.nuxeo.ecm.platform.type.TypeManager"
            jndiName="%TypeManager"
            private="false"/>
          ...
          <repository
            connector="connectorClass" description="A description" name="demo"/>
          ...
        </server>

All attributes other than name are optional and have as default values the values in the example above. The host attribute is optional only if you are contributing new service and repository bindings to a server delcared by other bundle.

  • The jndiSuffix and jndiPrefix are used to generate the final JNDI name if the specified jndiName begins with a %. In this case the final JNDI name will be computed as follow: jndiPrefix+jndiName+jndiSuffix where jndiname is the specified name without the % character.
  • The jndiContextFactory is used to create the JNDI InitialContext. By default a JNP INitialContext is created
  • host and port represents the JNDI server host and port
  • The connector classes are used to lookup and connect to services and/or repositories exposed by the server

A repository is defined by an unique name in the system, a connector class and a description suitable to be displayed in an UI. The connector is optional and the default one is org.nuxeo.ecm.platform.api.DefaultRepositoryConnector

The private attribute of a service means that rthe service is intentended to be of internal use for the container server. Such services are not exposed by the platform to the client. So ECM.getPlatform().getService(..) for such a service will return null.

For example private services can be used to access repositories (SoreSession services). CoreServices are never used directly - buit only in a repository session conetxt. So it is used internally by the server to create repository sessions and it is not exposed to the outside. This is also may avoid conflicts when several servers expose the same service. You can make all services private and only the needed one public.

Contribution Descriptors

  • Class: org.nuxeo.ecm.platform.api.ServerDescriptor

Existing Contributions

Contributions are presented in the same order as the registration order on this extension point. This order is displayed before the contribution name, in brackets.

  • nuxeo-platform-ws-5.8.jar
    <extension point="servers" target="org.nuxeo.ecm.platform.api.PlatformService">
    
        <documentation>Define the Web Service remote session manager as a platform
          service.
        </documentation>
    
        <server name="default">
    
          <service class="org.nuxeo.ecm.platform.api.ws.session.WSRemotingSessionManager"/>
        </server>
    
      </extension>